﻿using ST.Buz.Base.Entity;
using ST.Common.Util.Mvc;
using ST.WX.XCX.Model;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace ST.Buz.Base.ViewModel
{
	/// <summary>
	/// 
	/// </summary>
	public class VM_IMS_Partner : IMS_Partner
	{
		/// <summary>
		/// 卡类型
		/// </summary>
		public int CardCatID { get; set; }

		/// <summary>
		/// 卡号
		/// </summary>
		public string CardNo { get; set; }

		/// <summary>
		/// 有效期范围内使用
		/// </summary>
		public bool HasExpire { get; set; }

		/// <summary>
		/// 有效开始日期
		/// </summary>
		public DateTime? ValidFrom { get; set; }

		/// <summary>
		/// 有效截止日期
		/// </summary>
		public DateTime? ExpireOn { get; set; }

		///// <summary>
		///// 充值金额
		///// </summary>
		//public decimal CashIn { get; set; }

		///// <summary>
		///// 赠送金额
		///// </summary>
		//public decimal CashBonus { get; set; }

		///// <summary>
		///// 到账金额
		///// </summary>
		//public decimal CashBalance { get; set; }

		///// <summary>
		///// 充值次数
		///// </summary>
		//public decimal ConponIn { get; set; }

		///// <summary>
		///// 赠送次数
		///// </summary>
		//public decimal ConponBonus { get; set; }

		///// <summary>
		///// 到账次数
		///// </summary>
		//public decimal ConponBalance { get; set; }
	}

	public partial class VMS_IMS_Partner : BaseSearchModel
	{
		public string name { get; set; }

		public string code { get; set; }

		public string pycode { get; set; }

		public string phone { get; set; }

		public string contactman { get; set; }

		public string contactphone { get; set; }

		public int[] catid { get; set; }

		public int[] type { get; set; }

		public int[] ids { get; set; }
	}

	public partial class VML_IMS_Partner
	{
		public int ID { get; set; }

		public string Name { get; set; }
		public int CatID { get; set; }
		public string CatName { get; set; }
		public int Type { get; set; }
		public string Code { get; set; }
		public int Sort { get; set; }
		public int StateNow { get; set; }
		public int OrgID { get; set; }
		public string Province { get; set; }
		public string City { get; set; }
		public string District { get; set; }
		public string Town { get; set; }
		public string Location { get; set; }
		public string AddManName { get; set; }
		public string ContactMan { get; set; }
		public string ContactPhone { get; set; }
		public string PYCode { get; set; }
		public string Phone { get; set; }
		public int Gender { get; set; }
		public DateTime AddDate { get; set; }
		public DateTime? BirthDate { get; set; }
		public string Fax { get; set; }
		public decimal TotalCashBalance { get; set; }
		public decimal TotalCashIn { get; set; }
	}

	public partial class VML_IMS_Member
	{
		public int ID { get; set; }

		public string Name { get; set; }
		public int CatID { get; set; }
		public string CatName { get; set; }
		public int Type { get; set; }
		public string Code { get; set; }
		public int Sort { get; set; }
		public int StateNow { get; set; }
		public int OrgID { get; set; }
		public string Province { get; set; }
		public string City { get; set; }
		public string District { get; set; }
		public string Town { get; set; }
		public string Location { get; set; }
		public string AddManName { get; set; }
		public string ContactMan { get; set; }
		public string ContactPhone { get; set; }
		public string PYCode { get; set; }
		public string Phone { get; set; }
		public int Gender { get; set; }
		public DateTime AddDate { get; set; }
		public DateTime? BirthDate { get; set; }
		public string Fax { get; set; }
		public decimal TotalCashBalance { get; set; }
		public decimal TotalCashIn { get; set; }

		public decimal DebtLimit { get; set; }

		public decimal DebtTotal { get; set; }

		public decimal DebtAvailable { get { return DebtTotal > DebtLimit ? 0 : DebtLimit - DebtTotal; } }
	}
}
